
<template>
  <el-calendar>
    <!-- 这里使用的是 2.5 slot 语法，对于新项目请使用 2.6 slot 语法-->
    <template
      slot="dateCell"
      slot-scope="{date, data}">
      <p :class="data.isSelected ? 'is-selected' : ''" @click="checkin">
        {{ data.day.split('-').slice(1).join('-') }} {{ data.isSelected ? '✔️' : ''}}
      </p>
    </template>
  </el-calendar>

</template>
<style>
.is-selected {
  color: #1989FA;
}
</style>
<script >
import {addAttendance} from "@/api/timesheets/timesheets"

export default {
  created() {
  },

  methods:{
    checkin(){
      addAttendance().then(res=>{
        console.log("添加员工考勤成功")
      })
    }
  }
}
</script>
